"use strict";
cc._RF.push(module, '50a50F8k+xLLZsyhiLCF6rF', 'StorageManager');
// scripts/StorageManager.js

"use strict";

var t = require;
var e = module;
var o = exports;
Object.defineProperty(o, "__esModule", {
  value: !0
}), o.StorageManager = void 0;
var i = t("Global"),
    n = t("BaseStorage");

function a() {
  if (n.BaseStorage.getInt(i.BaseStorageKey.clock, 0)) {
    var t = n.BaseStorage.getInt(i.BaseStorageKey.SignDay, 0) + 1;
    t > 7 && (t = 1), n.BaseStorage.setInt(i.BaseStorageKey.SignDay, t), n.BaseStorage.setInt(i.BaseStorageKey.clock, 0);
  }
}

function r() {
  return new Date().toDateString();
}

function s() {
  return n.BaseStorage.getItem(i.BaseStorageKey.DailyTaskRefresh, {
    keyArr: []
  });
}

function l(t) {
  return n.BaseStorage.getItem(t, {});
}

(function (t) {
  t.refreshDailyTaskStorage = function () {
    var t = i.BaseStorageKey.SameDay + "refreshDailyTaskStorage";

    if (r() != n.BaseStorage.getString(t)) {
      n.BaseStorage.setString(t, r()), a();

      for (var e = s(), o = 0; o < e.keyArr.length; o++) {
        var l = e.keyArr[o];
        n.BaseStorage.removeKey(l);
      }
    }
  }, t.setDailyTaskStorageKey = function () {
    for (var t = [], e = 0; e < arguments.length; e++) {
      t[e] = arguments[e];
    }

    for (var o = s(), a = 0; a < t.length; a++) {
      var r = t[a];
      -1 == o.keyArr.indexOf(r) && o.keyArr.push(r);
    }

    n.BaseStorage.setItem(i.BaseStorageKey.DailyTaskRefresh, o);
  }, t.getInform = function (t) {
    return l(t), 0;
  };
})(o.StorageManager || (o.StorageManager = {}));

cc._RF.pop();